<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<table id="tableEleves" class="table table-striped table-hover">
    <thead>
        <tr>
            <th>ID</th>
            <th>Nom</th>
            <th>Prénom</th>
            <th>INE</th>
            <th>Classe</th>
            <th>ID Siecle</th>
            <th>
            </th>
        </tr>
    </thead>
    <tbody>
        <c:forEach items="${eleves}" var="eleve">
        <tr>
            <td>${eleve.id}</td>
            <td>${eleve.nom}</td>
            <td>${eleve.prenom}</td>
            <td>${eleve.ine}</td>
            <td>
                <a href="<c:url value="classe.edit?classeid=${eleve.scolariteActuelle.classe.id}" />">${eleve.scolariteActuelle.classe.libelle}</a>
            </td>
            <td>${eleve.idSiecle}</td>
            <td>
                <button type="button" class="btn btn-primary btn-xs" onClick="javascript:location='<c:url value="eleve.edit?eleveId=${eleve.id}" />'">Modifier</button>
                <button type="button" class="btn btn-default btn-xs" onClick="javascript:location='<c:url value="eleve.delete?eleveId=${eleve.id}" />'">Supprimer</button>
            </td>
        </tr>
        </c:forEach>
    </tbody>
</table>